package logic

import (
	"context"
	"github.com/zeromicro/go-zero/core/logx"
	"zero-demo-rpc/mall/user/rpc/internal/svc"
	"zero-demo-rpc/mall/user/rpc/types/user"
)

type RegisterUserLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewRegisterUserLogic(ctx context.Context, svcCtx *svc.ServiceContext) *RegisterUserLogic {
	return &RegisterUserLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *RegisterUserLogic) RegisterUser(in *user.IdRequest) (*user.UserResponse, error) {
	// todo: add your logic here and delete this line

	return &user.UserResponse{
		UserName:    "test",
		UserAddress: "注册成功：213243431321",
	}, nil
}
